package com.vercon.moensmart.mode;

import android.content.pm.PackageInfo;
import android.graphics.drawable.Drawable;

import com.vercon.common.room.entry.AppDataRoomInfo;

/**
 * Created by csh on 2020/12/1
 */

public class AppMode {

    private int id = -1;
    private String name;//为空则可能第三方软件
    private AppDataRoomInfo mInfo;//name为空，mInfo为空，则没有此项下载第三方菜单功能
    private  String packageName;//包名
    private  String label;//应用在系统里面获取到的，名称
    private Drawable icon;//应用在系统里面获取到的，图标
    private int flags;//应用在系统里面获取到的，一个标志，判断是否可以显示卸载的
    private boolean isSelect = false;

    private PackageInfo packageInfo;

    public AppMode() {

    }

    public AppMode(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public AppMode(int id, String name, String packageName) {
        this.id = id;
        this.name = name;
        this.packageName = packageName;
    }

    public AppMode(int id, String name, AppDataRoomInfo mInfo, String packageName, String label, Drawable icon, int flags) {
        this.id = id;
        this.name = name;
        this.mInfo = mInfo;
        this.packageName = packageName;
        this.label = label;
        this.icon = icon;
        this.flags = flags;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(String packageName) {
        this.packageName = packageName;
    }

    public AppDataRoomInfo getInfo() {
        return mInfo;
    }

    public void setInfo(AppDataRoomInfo info) {
        mInfo = info;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Drawable getIcon() {
        return icon;
    }

    public void setIcon(Drawable icon) {
        this.icon = icon;
    }

    public int getFlags() {
        return flags;
    }

    public void setFlags(int flags) {
        this.flags = flags;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public PackageInfo getPackageInfo() {
        return packageInfo;
    }

    public void setPackageInfo(PackageInfo packageInfo) {
        this.packageInfo = packageInfo;
    }

    @Override
    public String toString() {
        return "AppMode{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", mInfo=" + mInfo +
                ", packageName='" + packageName + '\'' +
                ", label='" + label + '\'' +
                ", icon=" + icon +
                ", flags=" + flags +
                ", isSelect=" + isSelect +
                '}';
    }
}